<template>
  <div>
    <div>
      beta:{{ count }}
    </div>

    <button @click="addN">+6</button>
  </div>
</template>

<script>
import bus from '../../../utils/eventBus.js'
export default {
  data() {
    return {
    //   count: 0
    }
  },
  computed: {
    count() {
      return this.$store.state.betaCount
    }
  },
  mounted() {
    bus.$on('add-jack', (data) => {
      this.count += data
    })
  },
  methods: {
    addN() {
    //   bus.$emit('add-beta', 6)
    // this.$store.state.jackCount += 6
      this.$store.commit('addBeta', 6)
    }
  }
}
</script>

  <style>

  </style>

